cmake_minimum_required(VERSION 3.0.2)
project(arm_detector)

add_compile_options(-std=c++14)

find_package(catkin REQUIRED COMPONENTS
  roscpp
  sensor_msgs
  std_msgs
  std_srvs
  cv_bridge
  image_transport
  jsk_recognition_msgs
  tf
  tf_conversions
)
find_package(OpenCV 4 REQUIRED)
find_package(Eigen3 REQUIRED)

set(DARKNET_ROOT "/home/k331/projects/darknet-master")

catkin_package(
#  INCLUDE_DIRS include
#  LIBRARIES arm_detector
#  CATKIN_DEPENDS roscpp sensor_msgs std_msgs
#  DEPENDS system_lib
)

## Build ##

include_directories(
# include
  ${catkin_INCLUDE_DIRS}
  ${OPENCV_INCLUDE_DIRS}
  ${DARKNET_ROOT}/include
  "/usr/include/eigen3"
)

add_executable(${PROJECT_NAME}_node 
  src/main.cc
)

add_dependencies(${PROJECT_NAME}_node 
  ${${PROJECT_NAME}_EXPORTED_TARGETS} 
  ${catkin_EXPORTED_TARGETS}
)

target_link_libraries(${PROJECT_NAME}_node
  ${catkin_LIBRARIES}
  ${OpenCV_LIBRARIES}
  ${DARKNET_ROOT}/libdarknet.so
)